<template>
  <el-select v-model="agency_name" clearable filterable placeholder="请选择">
    <el-option v-for="item of AgencyList" :key="item.id" :label="item.id+'>'+item.user_name+'>'+item.nickname" :value="item.id" />
  </el-select>
</template>
<script>
import {  getAgencyList} from '@/api'
export default {
  data () {
    return {
      agency_name: null,
      AgencyList: [],
    }
  },
  created () {
    this.getAgencyList()
  },
  methods: {
    getAgencyList () {
      getAgencyList({ page_size: 1000, page_no: 1, agency_type: 1 }).then(res => {
        if (res.status === 0) {
          this.AgencyList = res.data.items
        }
      })
    }
  },
  watch: {
    agency_name(){
      this.$emit('input',this.agency_name)
    }
  }
}
</script>
